﻿

using IotContract.Dtos.Servers.Pushs;
using IotContract.Enums;
using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Models.Process.F29;
[ProtoContract]
public class F29ProcessScData: ProcessBaseData
{

    [ProtoMember(1)]
    public string EquipNum { get; set; }
  
  
    /// <summary>
    /// 单元号  1为单叉  2为双叉
    /// </summary>
    [ProtoMember(4)]
    public string UnitNum { get; set; }
    #region 读取
    /// <summary>
    /// 电源 
    /// </summary>
    [ProtoMember(5)]
    public int Power { get; set; }
    /// <summary>
    /// 模式 1:自动 2:手动
    /// </summary>
    [ProtoMember(6)]
    public int Mode { get; set; }
    /// <summary>
    /// trouble发生为1，不启用
    /// </summary>
    [ProtoMember(7)]
    public int Trouble { get; set; }
    /// <summary>
    /// 设备动作  收到返送指令后为1  返送指令结束后为0
    /// </summary>
    [ProtoMember(8)]
    public int Action { get; set; }
    /// <summary>
    /// 作业Ready状态  返送指令执行时为0 
    /// </summary>
    [ProtoMember(9)]
    public int Ready { get; set; }

    /// <summary>
    /// 返送结束时 为1，返送结束确认后  为0
    /// </summary>
    [ProtoMember(10)]
    public int SendEnd { get; set; }

    /// <summary>
    /// 错误码
    /// </summary>
    [ProtoMember(11)]
    public int Error { get; set; }

    /// <summary>
    /// 是否发生火灾
    /// </summary>
    [ProtoMember(12)]
    public int Fire { get; set; }
    /// <summary>
    /// 取货列
    /// </summary>
    [ProtoMember(13)]
    public int FromX { get; set; }
    /// <summary>
    /// 取货行
    /// </summary>
    [ProtoMember(14)]
    public int FromY { get; set; }
    /// <summary>
    /// 取货段
    /// </summary>
    [ProtoMember(15)]
    public int FromZ { get; set; }
    /// <summary>
    /// 去向列
    /// </summary>
    [ProtoMember(16)]
    public int ToX { get; set; }
    /// <summary>
    /// 去向行
    /// </summary>
    [ProtoMember(17)]
    public int ToY { get; set; }
    /// <summary>
    /// 去向段
    /// </summary>
    [ProtoMember(18)]
    public int ToZ { get; set; }
    /// <summary>
    /// 托盘
    /// </summary>
    [ProtoMember(19)]
    public string Tray { get; set; }
    /// <summary>
    /// 托盘2
    /// </summary>
    [ProtoMember(20)]
    public string Tray2 { get; set; }










    #endregion

    #region 写入
    /// <summary>
    /// 返送指示
    /// </summary>
    public int W_Send { get; set; }
    /// <summary>
    /// 返送结束确认
    /// </summary>
    public int W_SendEnd { get; set; }
    /// <summary>
    /// 错误复位
    /// </summary>
    public int W_Reset { get; set; }

    /// <summary>
    /// 取货列
    /// </summary>
    public int W_FromX { get; set; }
    /// <summary>
    /// 取货行
    /// </summary>
    public int W_FromY { get; set; }
    /// <summary>
    /// 取货段
    /// </summary>
    public int W_FromZ { get; set; }
    /// <summary>
    /// 去向列
    /// </summary>
    public int W_ToX { get; set; }
    /// <summary>
    /// 去向行
    /// </summary>
    public int W_ToY { get; set; }
    /// <summary>
    /// 去向段
    /// </summary>
    public int W_ToZ { get; set; }
    /// <summary>
    /// 托盘
    /// </summary>
    public string W_Tray { get; set; }
    /// <summary>
    /// 写入托盘
    /// </summary>
    public string W_Tray2 { get; set; }
    #endregion

    #region 右叉新增属性
    /// <summary>
    /// 返送结束时 为1，返送结束确认后  为0
    /// </summary>
    [ProtoMember(21)]
    public int SendEnd2 { get; set; }

    
    /// <summary>
    /// 1:左侧  2:右侧  3:双侧
    /// </summary>
    [ProtoMember(22)]
    public int UsePoke { get; set; }

    /// <summary>
    /// 取货列
    /// </summary>
    [ProtoMember(23)]
    public int FromX2 { get; set; }
    /// <summary>
    /// 取货行
    /// </summary>
    [ProtoMember(24)]
    public int FromY2 { get; set; }
    /// <summary>
    /// 取货段
    /// </summary>
    [ProtoMember(25)]
    public int FromZ2 { get; set; }
    /// <summary>
    /// 去向列
    /// </summary>
    [ProtoMember(26)]
    public int ToX2 { get; set; }
    /// <summary>
    /// 去向行
    /// </summary>
    [ProtoMember(27)]
    public int ToY2 { get; set; }
    /// <summary>
    /// 去向段
    /// </summary>
    [ProtoMember(28)]
    public int ToZ2 { get; set; }
    /// <summary>
    /// 托盘
    /// </summary>
    [ProtoMember(29)]
    public string RightTray { get; set; }
    /// <summary>
    /// 托盘
    /// </summary>
    [ProtoMember(30)]
    public string RightTray2 { get; set; }



    #region 右叉写入新增

    /// <summary>
    /// 1:左侧  2:右侧  3:双侧  4:同时作业
    /// </summary>
    public int W_PokeUse { get; set; }

    /// <summary>
    /// 取货列
    /// </summary>
    public int W_FromX2 { get; set; }
    /// <summary>
    /// 取货行
    /// </summary>
    public int W_FromY2 { get; set; }
    /// <summary>
    /// 取货段
    /// </summary>
    public int W_FromZ2 { get; set; }
    /// <summary>
    /// 去向列
    /// </summary>
    public int W_ToX2 { get; set; }
    /// <summary>
    /// 去向行
    /// </summary>
    public int W_ToY2 { get; set; }
    /// <summary>
    /// 去向段
    /// </summary>
    public int W_ToZ2 { get; set; }
    /// <summary>
    /// 托盘
    /// </summary>
    public string W_RightTray { get; set; }
    /// <summary>
    /// 右侧托盘2
    /// </summary>
    public string W_RightTray2 { get; set; }
    #endregion

    #endregion

    /// <summary>
    /// 读取属性
    /// </summary>
    public DateTime? ReadTime { get; set; }

    /// <summary>
    /// 绑定的任务号
    /// </summary>
    [ProtoMember(31)]
    public string JobID { get; set; }


    /// <summary>
    /// 是否存在托盘
    /// </summary>
    [ProtoMember(32)]
    public int ExistTray { get; set; }
    /// <summary>
    /// poke在正位置时为1  poke在动作中时为0,未启用
    /// </summary>
    public int PokeCenter { get; set; }
    /// <summary>
    /// poke是否可以使用
    /// </summary>
    [ProtoMember(33)]
    public int CanPoke { get; set; }

    /// <summary>
    /// 是否存在托盘
    /// </summary>
    [ProtoMember(34)]
    public int ExistTray2 { get; set; }

    /// <summary>
    /// poke是否可以使用
    /// </summary>
    [ProtoMember(35)]
    public int CanPoke2 { get; set; }


    /// <summary>
    /// 动作数据类型
    /// </summary>
    [ProtoMember(36)]
    public ProcessProviderType ActionType { get; set; }

    /// <summary>
    /// 比率
    /// </summary>
    [ProtoMember(37)]
    public int Rate { get; set; }

}
